#pragma once
#include "scubserver.h"

#include<string>

class HTMLizer: public Scubserver
{
private:
	Scope* m_pxCurrentScope;
	Scope::Type m_eScopeType; //Premature optimization! :)
	int m_nLineNumber;
	char m_cLookAhead; //For checking whether &nbsp needed

public:
	HTMLizer(void);
	~HTMLizer(void);
	void generateHeader();
	void generateFooter();

	//TODO: The following Keyword functions actually belong in Scuba/Symbol
	bool isKeyword(const std::string& s);
	bool isPreprocessorKeyword (const std::string& s);

	void createSpanForScope();
	void createSpanEnd();
	void createNewline();

	virtual void onNewToken(Token& inToken);
	virtual void onScopeEntry(Scope& inNewScope, Scope& inOldScope);
    virtual void onScopeExit(Scope& inNewScope, Scope& inOldScope);
	virtual void setScope(Scope& inScope)
	{
		m_pxCurrentScope = &inScope;
	}

};
